﻿@model IPagination<Banker>
@using BankCreditPortfolio.DAL.Entities
@using MvcContrib.Pagination
@using MvcContrib.UI.Pager
@using MvcContrib.UI.Grid
@{
    ViewBag.Title = "AddEmployees";
}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<link href="@Url.Content("~/Content/Styles/customgrid.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/Admin/Styles/forms.css")" rel="stylesheet" type="text/css" />

@using (Html.BeginForm())
{
	<h2>All Employees</h2>
	<div>
	
	@{
		if (Model.Count() > 0)
        {
			Html.Grid<Banker>(Model).Columns(column =>
            {
                column.For(x => x.Profile.FirstName).Named("First Name");
				column.For(x => x.Profile.LastName).Named("Last Name");
				column.For(x => x.Profile.MiddleName).Named("Middle Name");
				column.For(x => x.Account.Role.Title).Named("Role");
				//column.For(x => Html.ActionLink("More...", "BankerInfo", new { BankerId = x.BankerId })).Named("More");
				//column.For(x => Html.ActionLink("Edit...", "EditBanker", new { BankerId = x.BankerId })).Named("Edit");
				column.For(x => Html.ActionLink("Delete...", "DeleteBanker", new { BankerId = x.BankerId })).Named("Delete");
            }).Render();
            <br />
            @Html.Pager(Model).First("First").Last("Last").Next("Next").Previous("Previous")
        }
        else
        {
            <div>There is no tariffs.</div>
        }
    }
	</div>
}
